using System.Data.Entity.ModelConfiguration;
namespace EFUtil.TestApplication
{
	public class ProductMap : EntityTypeConfiguration<Product>
	{
		public ProductMap()
		{
			// Primary Key
			HasKey(t => t.ProductId);

			// Properties
			Property(t => t.ProductNumber)
				.IsRequired()
				.HasMaxLength(30);
				
			Property(t => t.ProductName)
				.IsRequired()
				.HasMaxLength(50);
		}
	}
}

